package com.kyu.LogDiff;

import lombok.Data;
import org.apache.hadoop.io.Writable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;


@Data
public class Bean implements Writable {
    private Integer offset;
    private Double temper;
    private Double temper_diffdew;
    private Double press;

    @Override
    public void write(DataOutput out) throws IOException {
        out.writeInt(offset);
        out.writeDouble(temper);
        out.writeDouble(temper_diffdew);
        out.writeDouble(press);
    }

    @Override
    public void readFields(DataInput in) throws IOException {
        this.offset = in.readInt();
        this.temper = in.readDouble();
        this.temper_diffdew = in.readDouble();
        this.press = in.readDouble();
    }
}
